/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package anotherFrameWork;

/**
 *
 * @author ThanhTu
 */

class linkPoint
{
    public point p;
    public linkPoint next;
    
    public linkPoint(point p)
    {
        this.p = new point(p);
    }
}

public class listLinkPoint {
    private linkPoint head;
    private linkPoint tail;
    
    public listLinkPoint()
    {
        this.head = null;
        this.tail = null;
    }
    
    public boolean isEmty()
    {
        if(this.head == null && this.tail == null)
        {
            return true;
        }
        return false;
    }
    
    public void addPoint(point p)
    {
        if(isEmty() == true)
        {
            linkPoint temp = new linkPoint(p);
            this.head = temp;
            this.tail = temp;
            temp.next = null;
        }
        else
        {
            linkPoint temp = new linkPoint(p);
            this.tail.next = temp;
            this.tail = temp;
            this.tail.next = null;
        }
    }
    
    public static void main(String[] args)
    {
        listLinkPoint p = new listLinkPoint();
        p.addPoint(new point(0,1));
        p.addPoint(new point(1,1));
        p.addPoint(new point(2,1));
        p.addPoint(new point(3,1));
        p.addPoint(new point(4,1));
        p.addPoint(new point(5,1));
    }
            
    
    
}
